﻿@(
    Html.X().Portlet()
        .Title("待办事项")
        .Closable(false)
        .Layout(LayoutType.Fit)
        .Anchor("100% 50%")
        .Height(350)
        .TopBar(new Toolbar
        {
            Items = { 
            new Button { 
                Text = "刷新",
                Icon = Icon.ArrowRefresh,
                OnClientClick = "App.Store1.load()"
            }
        }
        })
        .Items(
            Html.X().Panel()
            .Region(Region.Center)
            .Margins("5 5 5 5")
            .Items(
                Html.X().GridPanel()
                    .ID("gpQueryBaklogTasks")
                    .Region(Region.Center)
        //.Store(X.Store()
        //        .Model(X.Model()
        //            .Fields(
        //                    new ModelField("PID", ModelFieldType.String),
        //                    new ModelField("RequestPerson", ModelFieldType.String),
        //                    new ModelField("ProcessTime", ModelFieldType.Date),
        //                    new ModelField("CurrentProcessNodeCode", ModelFieldType.String),
        //                    new ModelField("NextProcessNodeCode", ModelFieldType.String)
        //                    )
        //                )
        //        .DataSource(Model)
        //        )
                    .ColumnModel(
                                Html.X().Column().Text("TaskName").DataIndex("TaskName").Flex(1),
                                Html.X().Column().Text("RequestPerson").DataIndex("RequestPerson"),
                                Html.X().DateColumn().Text("ProcessTime").DataIndex("ProcessTime").Format("yyyy-MM-dd")
                                    )
                    )
        )
)